package com.zb.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zb.entity.ZjCode03;
import com.zb.entity.ZjCode04;
import com.zb.entity.ZjCodeInfo04;
import com.zb.entity.ZjCodeLog04;
import com.zb.vo.CodeRelateoinInfoVo;

import java.util.List;
import java.util.concurrent.CountDownLatch;

/**
 * @Author WEN
 * @Date 2023/8/29 0029
 **/
public interface ZjCode04Service extends IService<ZjCode04> {
    /**
     * 异步执行并提交事务
     * @param countDownLatch
     * @param codeList
     * @param codeInfos
     * @param codeLogs
     */
    void save(CountDownLatch countDownLatch, List<ZjCode04> codeList, List<ZjCodeInfo04> codeInfos, List<ZjCodeLog04> codeLogs);
    void save(List<ZjCode04> codeList, List<ZjCodeInfo04> codeInfos, List<ZjCodeLog04> codeLogs);


    /**
     * 根据编码ID激活编码
     * @param code04s
     * @param codeLog04s
     */
    void updateBatchActivCodeByIds(List<ZjCode04> code04s, List<ZjCodeLog04> codeLog04s);

    /**
     * 根据编码ID删除编码
     * @param codeIds 编码ID
     */
    void deleteBatchByIds(List<Long> codeIds);

    /**
     * 根据编码批次ID查询检查是否编码有关联信息
     * @param codeBatchIds
     */
    List<CodeRelateoinInfoVo> checkCodeRelationInfoForDeleteByBatchIds(List<Long> codeBatchIds);

    /**
     * 根据批次ID获取编码ID
     * @param batchId
     * @return
     */
    List<Long> getIdByBatchId(Long batchId);

    /**
     * 根据编码ID查询检查是否编码有关联信息
     * @param ids
     * @return
     */
    List<CodeRelateoinInfoVo> checkCodeRelationInfoByIds(List<Long> ids);
}
